package com.trkj.pojo;

import java.io.Serializable;
import javax.persistence.*;

import com.alibaba.fastjson.annotation.JSONField;

import java.math.BigDecimal;
import java.sql.Timestamp;
import java.util.List;


/**
 * The persistent class for the TEACHER database table.
 * 
 */
@Entity
@NamedQuery(name="Teacher.findAll", query="SELECT t FROM Teacher t")
public class Teacher implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@SequenceGenerator(name="TEACHER_TEACHERID_GENERATOR", sequenceName="HR")
	@GeneratedValue(strategy=GenerationType.SEQUENCE, generator="TEACHER_TEACHERID_GENERATOR")
	@Column(name="TEACHER_ID")
	private long teacherId;

	@Column(name="COST_UNITPRICE")
	private BigDecimal costUnitprice;

	@Column(name="SUBSIDIARY_ORGAN")
	private String subsidiaryOrgan;

	@Column(name="TEACHER_ADDRESS")
	private String teacherAddress;

	@Column(name="TEACHER_CREATORDATE")
	private Timestamp teacherCreatordate;

	@Column(name="TEACHER_NAMAE")
	private String teacherNamae;

	@Column(name="TEACHER_PERSON")
	private String teacherPerson;

	@Column(name="TEACHER_REMARK")
	private String teacherRemark;

	@Column(name="TEACHER_STOP")
	private BigDecimal teacherStop;

	@Column(name="TEACHER_UPDATEDATE")
	private Timestamp teacherUpdatedate;

	//bi-directional many-to-one association to StaffInformation
	@OneToMany(mappedBy="teacher")
	@JSONField(serialize=false)
	private List<StaffInformation> staffInformations;

	//bi-directional many-to-one association to DefinitionDept
	@ManyToOne
	@JoinColumn(name="DEFIDE_ID")
	private DefinitionDept definitionDept;

	public Teacher() {
	}

	public long getTeacherId() {
		return this.teacherId;
	}

	public void setTeacherId(long teacherId) {
		this.teacherId = teacherId;
	}

	public BigDecimal getCostUnitprice() {
		return this.costUnitprice;
	}

	public void setCostUnitprice(BigDecimal costUnitprice) {
		this.costUnitprice = costUnitprice;
	}

	public String getSubsidiaryOrgan() {
		return this.subsidiaryOrgan;
	}

	public void setSubsidiaryOrgan(String subsidiaryOrgan) {
		this.subsidiaryOrgan = subsidiaryOrgan;
	}

	public String getTeacherAddress() {
		return this.teacherAddress;
	}

	public void setTeacherAddress(String teacherAddress) {
		this.teacherAddress = teacherAddress;
	}

	public Timestamp getTeacherCreatordate() {
		return this.teacherCreatordate;
	}

	public void setTeacherCreatordate(Timestamp teacherCreatordate) {
		this.teacherCreatordate = teacherCreatordate;
	}

	public String getTeacherNamae() {
		return this.teacherNamae;
	}

	public void setTeacherNamae(String teacherNamae) {
		this.teacherNamae = teacherNamae;
	}

	public String getTeacherPerson() {
		return this.teacherPerson;
	}

	public void setTeacherPerson(String teacherPerson) {
		this.teacherPerson = teacherPerson;
	}

	public String getTeacherRemark() {
		return this.teacherRemark;
	}

	public void setTeacherRemark(String teacherRemark) {
		this.teacherRemark = teacherRemark;
	}

	public BigDecimal getTeacherStop() {
		return this.teacherStop;
	}

	public void setTeacherStop(BigDecimal teacherStop) {
		this.teacherStop = teacherStop;
	}

	public Timestamp getTeacherUpdatedate() {
		return this.teacherUpdatedate;
	}

	public void setTeacherUpdatedate(Timestamp teacherUpdatedate) {
		this.teacherUpdatedate = teacherUpdatedate;
	}

	public List<StaffInformation> getStaffInformations() {
		return this.staffInformations;
	}

	public void setStaffInformations(List<StaffInformation> staffInformations) {
		this.staffInformations = staffInformations;
	}

	public StaffInformation addStaffInformation(StaffInformation staffInformation) {
		getStaffInformations().add(staffInformation);
		staffInformation.setTeacher(this);

		return staffInformation;
	}

	public StaffInformation removeStaffInformation(StaffInformation staffInformation) {
		getStaffInformations().remove(staffInformation);
		staffInformation.setTeacher(null);

		return staffInformation;
	}

	public DefinitionDept getDefinitionDept() {
		return this.definitionDept;
	}

	public void setDefinitionDept(DefinitionDept definitionDept) {
		this.definitionDept = definitionDept;
	}

}